#ifndef __SHARE_MEM_H__
#define __SHARE_MEM_H__

#include <pthread.h>
#include <stdint.h>

#define SHARED_MEM_NAME_MAX_SIZE (128)
/* shared mem */
typedef struct {
    char name[SHARED_MEM_NAME_MAX_SIZE];
    size_t head;
    size_t tail;
    size_t capacity;
    size_t used_size;
    pthread_mutex_t mutex;
    pthread_cond_t cond;
} shared_mem_t;

#endif /* __SHARE_MEM_H__ */